<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>TensorSpace - Hello World Empty TensorSpace Model</title>
    <meta name="author" content="syt123450 / https://github.com/syt123450">

    <script src="../lib/three.min.js"></script>
    <script src="../lib/tween.min.js"></script>
    <script src="../lib/tf.min.js"></script>
    <script src="../lib/TrackballControls.js"></script>
    <script src="../../dist/tensorspace.min.js"></script>

    <script src="../lib/jquery.min.js"></script>

    <style>

        html, body {
            margin: 0;
            padding: 0;
            width: 100%;
            height: 100%;
        }

        #container {
            width: 100%;
            height: 100%;
        }

    </style>

</head>
<body>

<div id="container"></div>

<script>

	$( function() {

		let modelContainer = document.getElementById( "container" );
		let model = new TSP.models.Sequential( modelContainer );

		model.add( new TSP.layers.GreyscaleInput( {
            shape: [ 28, 28 ]
		} ) );
		model.add( new TSP.layers.Padding2d( {
            padding: [ 2, 2 ]
		} ) );
		model.add( new TSP.layers.Conv2d( {
            kernelSize: 5,
            filters: 6,
            strides: 1
		} ) );
		model.add( new TSP.layers.Pooling2d( {
            poolSize: [ 2, 2 ],
            strides: [ 2, 2 ]
		} ) );
		model.add( new TSP.layers.Conv2d({
            kernelSize: 5,
            filters: 16,
            strides: 1
		} ) );
		model.add( new TSP.layers.Pooling2d( {
            poolSize: [ 2, 2 ],
            strides: [ 2, 2 ]
		} ) );
		model.add( new TSP.layers.Dense( {
            units: 120
		} ) );
		model.add( new TSP.layers.Dense( {
            units: 84
		} ) );
		model.add( new TSP.layers.Output1d( {
			units: 10,
			outputs: [ "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" ]
		} ) );

		model.init( function() {

			console.log( "Hello World from TensorSpace!" );

        } );

	} );

</script>

</body>
</html>
